<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="author" content="https://github.com/JiHong88" />
    <meta name="keywords" content="wysiwyg,editor,javascript,suneditor,wysiwyg eidtor,rich text editor,html editor,contenteditable,위지위그 에디터 웹에디터">
    <meta name="description" content="Pure javascript wysiwyg web editor" />
    <title>Suneditor</title>
    <!-- bootstrap -->
    <link rel="stylesheet" href="../bootstrap/bootstrap.css" media="all">
    <script type="text/javascript" src="../bootstrap/tether.min.js"></script>
    <script type="text/javascript" src="../bootstrap/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="../bootstrap/bootstrap.min.js"></script>
    <!-- main css -->
    <link rel="stylesheet" href="../css/sample.css" media="all">
    <link rel="stylesheet" href="../css/github.css">
    <link rel="stylesheet" href="../css/github-frameworks.css">
    <!-- suneditor -->
    <link href="../../src/css/suneditor.css" rel="stylesheet" type="text/css">
    <script src="../../src/suneditor.js"></script>
    <script>
        $.getJSON('https://api.github.com/repos/JiHong88/SunEditor', function(data) {
            $('#stargazers').html(' Stargazers ' + data.stargazers_count);
        });
    </script>
</head>
<body class="back_categorys" style="min-width:100%; background-color:#000;">
<nav class="navbar navbar-inverse">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="../index.html" title="Suneditor"><b>Suneditor</b></a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="getting-started.html" style="color:#fff;" title="Getting started">Getting started</a></li>
                <li><a href="examples.html" title="Examples">Examples</a></li>
                <li><a href="customize.html" title="Customize">Customize</a></li>
                <li><a href="document.html" title="Document">Document</a></li>
                <li>&nbsp;&nbsp;</li>
                <li><a href="//codeload.github.com/JiHong88/SunEditor/zip/master" class="down-icon" title="Download">Download</a></li>
                <li>
                    <a href="https://github.com/JiHong88/SunEditor" target="_blank" id="stargazers" class="github-cat" title="go to github"> Stargazers 00</a>
                </li>
            </ul>
        </div>
    </div>
</nav>

<div class="content">
    <article class="markdown-body entry-content" itemprop="text">
        <h4>1. Include JS/CSS</h4>
        <div class="highlight highlight-text-html-basic"><pre>&lt;<span class="pl-ent">link</span> <span class="pl-e">href</span>=<span class="pl-s"><span class="pl-pds">"</span>src/css/suneditor.css<span class="pl-pds">"</span></span> <span class="pl-e">rel</span>=<span class="pl-s"><span class="pl-pds">"</span>stylesheet<span class="pl-pds">"</span></span> <span class="pl-e">type</span>=<span class="pl-s"><span class="pl-pds">"</span>text/css<span class="pl-pds">"</span></span>&gt;
&lt;<span class="pl-ent">script</span> <span class="pl-e">src</span>=<span class="pl-s"><span class="pl-pds">"</span>src/js/suneditor.js<span class="pl-pds">"</span></span>&gt;&lt;/<span class="pl-ent">script</span>&gt;
<span class="pl-c"><span class="pl-c">&lt;!--</span> Setting language (Default : English) <span class="pl-c">--&gt;</span></span>
<span class="pl-c"><span class="pl-c">&lt;!--</span>&lt;script src="lang/ko.js"&gt;&lt;/script&gt;<span class="pl-c">--&gt;</span></span></pre>
        </div>
        <h4>2. Target a element</h4>
        <div class="highlight highlight-text-html-basic">
            <pre>&lt;<span class="pl-ent">textarea</span> <span class="pl-e">id</span>=<span class="pl-s"><span
                    class="pl-pds">"</span>sample<span class="pl-pds">"</span></span>&gt;Hi&lt;/<span
                    class="pl-ent">textarea</span>&gt;</pre>
        </div>
        <h4>3. Create</h4>
        <div class="highlight highlight-source-js"><pre><span class="pl-ent">/**</span>
<span class="pl-ent">* ID : 'suneditor_sample'</span>
<span class="pl-ent">* ClassName : 'sun-eidtor'</span>
<span class="pl-ent">*/</span>
<span class="pl-k">var</span> suneditor <span class="pl-k">=</span> <span class="pl-c1">SUNEDITOR</span>.<span class="pl-en">create</span>(<span class="pl-s"><span class="pl-pds">'</span>sample<span class="pl-pds">'</span></span>,{
    <span class="pl-c"><span class="pl-c">//</span> insert options</span>
});</pre>
        </div>
        <h4>4. Contents display</h4>
        <div class="highlight highlight-source-js"><pre>When you display a document created by <span class="pl-c1">suneditor</span>

You need to include <span class="pl-s"><span class="pl-pds">suneditor-contents.css</span> file</span>.

Then add <span class="pl-ent">"sun-editor-editable"</span> to the class name of the <span class="pl-k">Tag element</span> that displays the content.

In <span class="pl-s"><span class="pl-pds">suneditor-contents.css</span></span>, you can define the style of all the tags created in <span class="pl-c1">suneditor</span>.</pre>
        </div>
    </article>

    <footer>
        <p>Suneditor create by JiHong.Lee</p>
        <p>Based on javascript</p>
        <p>Suneditor distributed under the MIT license.</p>
        <p><a href="https://github.com/JiHong88/SunEditor" target="_blank" style="color:#f4b124;">go to GitHub suneditor</a></p>
    </footer>
</div>

<script>

</script>
</body>
</html>